{% extends "home.html" %}


{% block title %} Add a book - {{ block.super }} {% endblock %}

{% block ads%}
{% endblock %}

{% block formspage %}
<div class="row">
<div class="span10">

{% ifequal next 'no' %}


<div class="row">
 
<div class="span10">

<form method="POST" action ="{% url book_add %}" > 

<fieldset>
   <legend>Add a book </legend>
                       
    {% for field in bookform %}
       
       {% if field.errors %}  
       <div class="clearfix error">
            {{ field.label_tag }}
            <div class="input">
              {{ field }}
             {% for error in field.errors %} 
             <span class="help-inline">
              {{ error }}</span>
            </div>
             {% endfor %}
        </div> 
       {% else %}          
  
        <div class="clearfix">
          {{ field.label_tag }}
          <div class="input">
           {{ field }}
          </div>
        </div>
       {% endif %}
    {% endfor %}

   <div class="clearfix">
     <div class="input">
       <input  type="submit" class="btn" value=" Add " >
     </div>
    </div>

</fieldset>
 
    
</form>
</div>
</div>

{% endifequal %}

{% ifequal next 'yes' %}

your book is added, <a href="{% url book_add %}">add another ?</a> 
{% endifequal %}

{% endblock %}

